home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / File_Startup.bed < prev    next >
Text File  |  1996-09-26  |  798b  |  47 lines

  1. /*
  2. ** $VER: File_Startup.bed 1.01 (26.03.96)
  3. **
  4. ** ARexx Macro executed at the opening of a file of Blacks Editor
  5. */
  6.  
  7. OPTIONS RESULTS
  8.  
  9. GetFileInfo
  10. PARSE VAR RESULT . . '"'name'"'
  11.  
  12. IF NAME ~= "" THEN DO
  13.     dotpos = LASTPOS('.', name)
  14.  
  15.     IF dotpos = 0 THEN
  16.         ext = ""
  17.     ELSE
  18.         ext = SUBSTR(name, dotpos+1)
  19.     END
  20.  
  21.     SELECT
  22.  
  23. /*
  24. ** You can insert here how many extensions you want:
  25. **
  26. ** For example:
  27. **
  28. ** WHEN (ext = 'asm') | (ext = 's') | (ext = 'a') THEN DO
  29. **     OpenPrefs "BED:Support/Assembler.prf"
  30. **     OpenDefinitions "BED:Support/Assembler.dfn"
  31. ** END
  32. **
  33. */
  34.  
  35.         WHEN (ext = 'c') | (ext = 'h') THEN DO
  36.             OpenPrefs "BED:Support/SAS_C.prf"
  37.             OpenDefinitions "BED:Support/SAS_C.dfn"
  38.         END
  39.  
  40.         OTHERWISE DO
  41.             OpenPrefs "BED:Support/Startup.prf"
  42.             OpenDefinitions "BED:Support/Startup.dfn"
  43.         END
  44.  
  45.     END
  46. END
  47.